package com.coocaa.ops.api.base.third.media.source.handler;


import com.coocaa.ops.api.common.model.HeaderModel;

import java.util.HashMap;
import java.util.Map;

/**
 * @author bijiahao
 * @date : 2019/10/9.
 * @description
 */
public final class HeaderHandler {

    /**
     * @param headerModel
     * @return java.util.Map
     * @method handlePackagingHeader
     * @description 影视源要求的header封装
     */
    public static Map<String, String> handlePackagingHeader(HeaderModel headerModel) {
        Map<String, String> header = new HashMap<>();
        header.put("Accept-Encoding", headerModel.getAcceptEncoding());
        header.put("cUDID", headerModel.getCUDID());
        header.put("MAC", headerModel.getMac());
        header.put("cModel", headerModel.getCModel());
        header.put("cChip", headerModel.getCChip());
        header.put("cSize", headerModel.getCSize());
        header.put("cResolution", headerModel.getCResolution());
        header.put("cTcVersion", headerModel.getCTcVersion());
        header.put("cFMode", headerModel.getCFMode());
        header.put("cPattern", headerModel.getCPattern());
        header.put("cUserInfo", headerModel.getCUserInfo());
        header.put("vAcceptSources", headerModel.getAcceptEncoding());
        header.put("vAppID", headerModel.getVAppID());
        header.put("vAppVersion", headerModel.getVAppVersion());
        return header;

    }
}
